package com.apt.action;

import com.apt.common.AptException;
import com.apt.facade.DataStoreHelper;
import com.apt.model.ForgotPwd;

public class ForgotPasswordAction extends AptBaseAction {

	private ForgotPwd userDetails;
	private String collegeId;

	public String getUidPwdDetails() {
		try {
			
			userDetails = DataStoreHelper.getUserDetails(collegeId);
						
			if (userDetails == null) {
				addActionError(getText("error.CollegeId"));
				return "error";

			}
		} catch (AptException apt) {
			addActionError(apt.getMessage());
			return "error";

		}

		return "success";

	}

	public String getCollegeId() {
		return collegeId;
	}

	public void setCollegeId(String collegeId) {
		this.collegeId = collegeId;
	}

	public ForgotPwd getUserDetails() {
		return userDetails;
	}

}
